package com.jp.knowledge.activity;

import android.view.View;
import android.widget.ImageView;

import com.jp.knowledge.R;
import com.jp.knowledge.fragment.ProductEvluationRecommendFragment;

import org.xutils.view.annotation.ViewInject;

/**
 * Created by 528787067@qq.com on 2017/5/11.
 */

public class RecommendActivity extends ProductEvaluationActivity {

    @ViewInject(R.id.icon_right)
    private ImageView createBtn;

    @Override
    protected void initFragment() {
        fragments.add(ProductEvluationRecommendFragment.newInstance(0, 0));
        fragments.add(ProductEvluationRecommendFragment.newInstance(1, 0));
        fragments.add(ProductEvluationRecommendFragment.newInstance(2, 0));
        fragments.add(ProductEvluationRecommendFragment.newInstance(3, 0));
        fragments.add(ProductEvluationRecommendFragment.newInstance(4, 0));
    }

    @Override
    protected void initTabLayout() {
        tabView.setTabItems("推荐", "最新", "最热", "官方", "我的");
        tabView.setupWithViewPager(viewPager);
    }

    @Override
    protected void initTitleBar() {
        super.initTitleBar();
        topName.setText(getIntent().getStringExtra("name"));
        createBtn.setVisibility(View.VISIBLE);
        createBtn.setImageResource(R.mipmap.guanzhutianjia);
        createBtn.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        if(v == createBtn) {

        } else {
            super.onClick(v);
        }
    }
}
